/* eslint-disable prettier/prettier */
import Downloadfromjson from '../../services/JsonDownLoad';
import { Alert } from 'react-native';

  export const buttons= [
    { title: '探寻火种', value: 'unit0' },
    { title: '寻找泥土', value: 'unit1' },
    { title: '荒漠探险', value: 'unit2' },
    { title: '圣林寻宝', value: 'unit3' },
    { title: '命运之轮', value: 'unit4' },
    { title: '亚当夏娃', value: 'unit5' },
    { title: '智寻魔盒', value: 'unit6' },
    { title: '诺亚方舟', value: 'unit7' },
    { title: '勇气力量', value: 'unit8' },
  ];

  export const handleButtonPress = async (value, sthis) => {
    console.log('Pressed:', value);
    await Downloadfromjson(value); // 等待这个函数完成
   sthis.props.navigation.navigate('warm', { unit: value,strc: 'learn',page: 1 });
   sthis.setState({  isLoading: false });
};